App({
  onLaunch(){
    //初始化云环境
    wx.cloud.init({ env: 'xyt-5gvuw8r6ea6e7967', traceUser: true })
    //获取OenId
    wx.cloud.callFunction({ name: 'function', data: { type: "getEnv" } }).then(res => {
      this.globalData.hasUserInformation=(res.result.user.data.length>0)?true:false
      this.globalData.openId=res.result.openid
    })
  },
  globalData: {
    openId:"",
    nickName:"",
    avatarUrl:"",
    hasUserInformation:false
  }
})